﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.Collections;

namespace DatabaseComponent
{
    public class OrganizationHierList : ArrayList, IHierarchicalEnumerable
    {
       

            // Summary:
            //     Returns a hierarchical data item for the specified enumerated item.
            //
            // Parameters:
            //   enumeratedItem:
            //     The System.Object for which to return an System.Web.UI.IHierarchyData.
            //
            // Returns:
            //     An System.Web.UI.IHierarchyData instance that represents the System.Object
            //     passed to the System.Web.UI.IHierarchicalEnumerable.GetHierarchyData(System.Object)
            //     method.
            public IHierarchyData GetHierarchyData(object enumeratedItem)
            {
                return (OrganizationHier)enumeratedItem;

            }

            public OrganizationHierList(List<OrgnizationChart> lstOrgnizationChart)
            {


                this.Clear();
                for (int i = 0; i < lstOrgnizationChart.Count; i++)
                {

                    this.Add(new OrganizationHier(lstOrgnizationChart[i]));
                }

            }
        
    }
}
